﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo513
{
    class People
    {
        private int idnum;
        private string name;
        private string imagernation;

        public int IdNum
        {
            get { return this.idnum; }
            set { this.idnum = value; }
        }

        public string Name
        {
            get { return this.name; }
            set { this.name = value; }
        }
        public string Imagernation
        {
            get { return this.imagernation; }
            set { this.imagernation = value; }
        }


        //无参构造方法
        public People() 
        {
            IdNum = 1001;
            Name = "张三";
            Imagernation = "软件开发部";
        }

        //有参构造方法
        public People(int idnum,string name,string imagernation) 
        {
            this.IdNum =idnum ;
            this.Name =name;
            this.Imagernation =imagernation ;
        }


        //打印信息的方法
        public void print()
        {
            Console.WriteLine("我的编号是{0},我的名字是{1},我来自{2}",this.idnum,this.name,this.imagernation);
        }
    }
}
